<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: brown;
        }
    </style>
</head>

<body>
    <div></div>
    <script>
        /* 
            移动端: 用手指代替鼠标进行操作。
            事件类型:
                1. touchstart  手指开始触摸屏幕的事件
                2. touchmove   手指在屏幕上移动的事件
                3. touchend    手指离开屏幕
        */

        let div = document.querySelector('div');

        div.addEventListener('touchstart', function () {
            console.log('手指触摸');
        });
        div.addEventListener('touchmove', function () {
            console.log('手指移动');
        });

        div.addEventListener('touchend', function () {
            console.log('手指离开');
        });
    </script>


</body>

</html>